//
//  cityCollectionReusableView.m
//  INAlienLand
//
//  Created by dllo on 15/7/8.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "cityCollectionReusableView.h"
#define WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height
@implementation cityCollectionReusableView
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super  initWithFrame:frame];
    if (self) {
        self.buttonbargain = [UIButton buttonWithType:UIButtonTypeSystem];
        self.buttonDest = [UIButton buttonWithType:UIButtonTypeSystem];
        self.buttonNote = [UIButton buttonWithType:UIButtonTypeSystem];
        self.buttonUse = [UIButton buttonWithType:UIButtonTypeSystem];
        self.bigImage = [[UIImageView alloc]init];
        self.recomand = [[UILabel alloc]init];
        [self addSubview:self.buttonNote];
         [self addSubview:self.buttonUse];
         [self addSubview:self.buttonbargain];
         [self addSubview:self.buttonDest];
        [self addSubview:self.recomand];
        [self addSubview:self.bigImage];
            }
    return self;

}
-(void)layoutSubviews
{
    self.bigImage .frame = CGRectMake(0, 0, WIDTH, HEIGHT/5*3);
    self.buttonDest.frame = CGRectMake(0, HEIGHT/5*3, WIDTH/4, HEIGHT/5);
    self.buttonUse.frame = CGRectMake(WIDTH/4, HEIGHT/5*3, WIDTH/4, HEIGHT/5);
    self.buttonbargain.frame = CGRectMake(WIDTH/2, HEIGHT/5*3, WIDTH/4, HEIGHT/5);
    self.buttonNote.frame = CGRectMake(WIDTH/4*3, HEIGHT/5*3, WIDTH/4, HEIGHT/5);
    self.recomand.frame = CGRectMake(0, HEIGHT/5*4, WIDTH, HEIGHT/5);
}
@end
